-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContentTypeAlias undefined for settings section #78
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to address the issue of whether you are editing a media type or content type before it can be pulled in.
@@ -46,6 +46,7 @@ public object GetDataTypeByAlias(string contentType, string contentTypeAlias, st | |||
case "member": | |||
ct = Services.MemberTypeService.Get(contentTypeAlias); | |||
break; | |||
case "settings": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue we have is that in the settings section you could be editing a content type or a media type so you need to figure out what type is being edited and redirect accordingly. Maybe do an early check for "settings" section before the switch statement and figure out what type you are editing then set the section variable to "content" or "media" respectively?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any suggestions on how to get the setting type? There doesn't appear to be a SettingTypeService or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think the only way you could do it is to detect it in the angular code (seeing what the URL of the page your are on is and if it's a type editor, what entity type it is) and then pass that in instead of the current "settings" value on this line: https://github.com/djscorch/umbraco-vorto/blob/f1e44d7920b8a9fb441e37e5661522ad59b22785/src/Our.Umbraco.Vorto/Web/UI/App_Plugins/Vorto/js/vorto.js#L314
It looks like this pull request has been updated since your last comments @mattbrailsford and I've tested it on a project and it fixes #69 for me. What else needs to be done to get this approved and merged? |
This pull request implements issue #69
In the JS file we added a fallback for ContentTypeAlias. In the controller let the settings section work in the same way as the content section.